// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

use crate::Result;
#[allow(unused_imports)]
use gax::error::Error;

/// Implements [Compliance](super::stub::Compliance) using a [gaxi::http::ReqwestClient].
#[derive(Clone)]
pub struct Compliance {
    inner: gaxi::http::ReqwestClient,
}

impl std::fmt::Debug for Compliance {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
        f.debug_struct("Compliance")
            .field("inner", &self.inner)
            .finish()
    }
}

impl Compliance {
    pub async fn new(config: gaxi::options::ClientConfig) -> gax::client_builder::Result<Self> {
        #[cfg(google_cloud_unstable_tracing)]
        let tracing_is_enabled = gaxi::options::tracing_enabled(&config);
        let inner = gaxi::http::ReqwestClient::new(config, crate::DEFAULT_HOST).await?;
        #[cfg(google_cloud_unstable_tracing)]
        let inner = if tracing_is_enabled {
            inner.with_instrumentation(&crate::info::INSTRUMENTATION_CLIENT_INFO)
        } else {
            inner
        };
        Ok(Self { inner })
    }
}

impl super::stub::Compliance for Compliance {
    async fn repeat_data_body(
        &self,
        req: crate::model::RepeatRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::RepeatResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/repeat:body".to_string();
                let path_template = "/v1beta1/repeat:body";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn repeat_data_body_info(
        &self,
        req: crate::model::RepeatRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::RepeatResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/repeat:bodyinfo".to_string();
                let path_template = "/v1beta1/repeat:bodyinfo";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = builder.query(&[("name", &req.name)]);
                let builder = builder.query(&[("serverVerify", &req.server_verify)]);
                let builder = req.intended_binding_uri.iter().fold(builder, |builder, p| {
                    builder.query(&[("intendedBindingUri", p)])
                });
                let builder = builder.query(&[("fInt32", &req.f_int32)]);
                let builder = builder.query(&[("fInt64", &req.f_int64)]);
                let builder = builder.query(&[("fDouble", &req.f_double)]);
                let builder = req
                    .p_int32
                    .iter()
                    .fold(builder, |builder, p| builder.query(&[("pInt32", p)]));
                let builder = req
                    .p_int64
                    .iter()
                    .fold(builder, |builder, p| builder.query(&[("pInt64", p)]));
                let builder = req
                    .p_double
                    .iter()
                    .fold(builder, |builder, p| builder.query(&[("pDouble", p)]));
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(req.info, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn repeat_data_query(
        &self,
        req: crate::model::RepeatRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::RepeatResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/repeat:query".to_string();
                let path_template = "/v1beta1/repeat:query";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = builder.query(&[("name", &req.name)]);
                    let builder = req
                        .info
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "info")
                        });
                    let builder = builder.query(&[("serverVerify", &req.server_verify)]);
                    let builder = req.intended_binding_uri.iter().fold(builder, |builder, p| {
                        builder.query(&[("intendedBindingUri", p)])
                    });
                    let builder = builder.query(&[("fInt32", &req.f_int32)]);
                    let builder = builder.query(&[("fInt64", &req.f_int64)]);
                    let builder = builder.query(&[("fDouble", &req.f_double)]);
                    let builder = req
                        .p_int32
                        .iter()
                        .fold(builder, |builder, p| builder.query(&[("pInt32", p)]));
                    let builder = req
                        .p_int64
                        .iter()
                        .fold(builder, |builder, p| builder.query(&[("pInt64", p)]));
                    let builder = req
                        .p_double
                        .iter()
                        .fold(builder, |builder, p| builder.query(&[("pDouble", p)]));
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn repeat_data_simple_path(
        &self,
        req: crate::model::RepeatRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::RepeatResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
        .or_else(|| {
            let path = format!(
                "/v1beta1/repeat/{}/{}/{}/{}/{}:simplepath",
                try_match(Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_string).map(|s| s.as_str()), &[Segment::SingleWildcard])?,
                try_match(Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_int32), &[Segment::SingleWildcard])?,
                try_match(Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_double), &[Segment::SingleWildcard])?,
                try_match(Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_bool), &[Segment::SingleWildcard])?,
                try_match(Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_kingdom), &[Segment::SingleWildcard])?,
            );
            let path_template = "/v1beta1/repeat/{info.f_string}/{info.f_int32}/{info.f_double}/{info.f_bool}/{info.f_kingdom}:simplepath";

            let builder = self
                .inner
                .builder(reqwest::Method::GET, path);
            let builder = (|| {
                let builder = builder.query(&[("name", &req.name)]);
                let builder = req.info.as_ref().map(|p| serde_json::to_value(p).map_err(Error::ser) ).transpose()?.into_iter().fold(builder, |builder, v| { use gaxi::query_parameter::QueryParameter; v.add(builder, "info") });
                let builder = builder.query(&[("serverVerify", &req.server_verify)]);
                let builder = req.intended_binding_uri.iter().fold(builder, |builder, p| builder.query(&[("intendedBindingUri", p)]));
                let builder = builder.query(&[("fInt32", &req.f_int32)]);
                let builder = builder.query(&[("fInt64", &req.f_int64)]);
                let builder = builder.query(&[("fDouble", &req.f_double)]);
                let builder = req.p_int32.iter().fold(builder, |builder, p| builder.query(&[("pInt32", p)]));
                let builder = req.p_int64.iter().fold(builder, |builder, p| builder.query(&[("pInt64", p)]));
                let builder = req.p_double.iter().fold(builder, |builder, p| builder.query(&[("pDouble", p)]));
                Ok(builder)
            })();
            Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
        })
        .ok_or_else(|| {
            let mut paths = Vec::new();
            {
                let builder = PathMismatchBuilder::default();
                let builder = builder.maybe_add(
                    Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_string).map(|s| s.as_str()),
                    &[Segment::SingleWildcard],
                    "info.f_string",
                    "*");
                let builder = builder.maybe_add(
                    Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_int32),
                    &[Segment::SingleWildcard],
                    "info.f_int32",
                    "*");
                let builder = builder.maybe_add(
                    Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_double),
                    &[Segment::SingleWildcard],
                    "info.f_double",
                    "*");
                let builder = builder.maybe_add(
                    Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_bool),
                    &[Segment::SingleWildcard],
                    "info.f_bool",
                    "*");
                let builder = builder.maybe_add(
                    Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_kingdom),
                    &[Segment::SingleWildcard],
                    "info.f_kingdom",
                    "*");
                paths.push(builder.build());
            }
            gax::error::Error::binding(BindingError { paths })
        })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn repeat_data_path_resource(
        &self,
        req: crate::model::RepeatRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::RepeatResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
        .or_else(|| {
            let path = format!(
                "/v1beta1/repeat/{}/{}/bool/{}:pathresource",
                try_match(Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_string).map(|s| s.as_str()), &[Segment::Literal("first/"), Segment::SingleWildcard])?,
                try_match(Some(&req).and_then(|m| m.info.as_ref()).and_then(|m| m.f_child.as_ref()).map(|m| &m.f_string).map(|s| s.as_str()), &[Segment::Literal("second/"), Segment::SingleWildcard])?,
                try_match(Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_bool), &[Segment::SingleWildcard])?,
            );
            let path_template = "/v1beta1/repeat/{info.f_string}/{info.f_child.f_string}/bool/{info.f_bool}:pathresource";

            let builder = self
                .inner
                .builder(reqwest::Method::GET, path);
            let builder = (|| {
                let builder = builder.query(&[("name", &req.name)]);
                let builder = req.info.as_ref().map(|p| serde_json::to_value(p).map_err(Error::ser) ).transpose()?.into_iter().fold(builder, |builder, v| { use gaxi::query_parameter::QueryParameter; v.add(builder, "info") });
                let builder = builder.query(&[("serverVerify", &req.server_verify)]);
                let builder = req.intended_binding_uri.iter().fold(builder, |builder, p| builder.query(&[("intendedBindingUri", p)]));
                let builder = builder.query(&[("fInt32", &req.f_int32)]);
                let builder = builder.query(&[("fInt64", &req.f_int64)]);
                let builder = builder.query(&[("fDouble", &req.f_double)]);
                let builder = req.p_int32.iter().fold(builder, |builder, p| builder.query(&[("pInt32", p)]));
                let builder = req.p_int64.iter().fold(builder, |builder, p| builder.query(&[("pInt64", p)]));
                let builder = req.p_double.iter().fold(builder, |builder, p| builder.query(&[("pDouble", p)]));
                Ok(builder)
            })();
            Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
        })
        .or_else(|| {
            let path = format!(
                "/v1beta1/repeat/{}/{}/bool/{}:childfirstpathresource",
                try_match(Some(&req).and_then(|m| m.info.as_ref()).and_then(|m| m.f_child.as_ref()).map(|m| &m.f_string).map(|s| s.as_str()), &[Segment::Literal("first/"), Segment::SingleWildcard])?,
                try_match(Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_string).map(|s| s.as_str()), &[Segment::Literal("second/"), Segment::SingleWildcard])?,
                try_match(Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_bool), &[Segment::SingleWildcard])?,
            );
            let path_template = "/v1beta1/repeat/{info.f_child.f_string}/{info.f_string}/bool/{info.f_bool}:childfirstpathresource";

            let builder = self
                .inner
                .builder(reqwest::Method::GET, path);
            let builder = (|| {
                let builder = builder.query(&[("name", &req.name)]);
                let builder = req.info.as_ref().map(|p| serde_json::to_value(p).map_err(Error::ser) ).transpose()?.into_iter().fold(builder, |builder, v| { use gaxi::query_parameter::QueryParameter; v.add(builder, "info") });
                let builder = builder.query(&[("serverVerify", &req.server_verify)]);
                let builder = req.intended_binding_uri.iter().fold(builder, |builder, p| builder.query(&[("intendedBindingUri", p)]));
                let builder = builder.query(&[("fInt32", &req.f_int32)]);
                let builder = builder.query(&[("fInt64", &req.f_int64)]);
                let builder = builder.query(&[("fDouble", &req.f_double)]);
                let builder = req.p_int32.iter().fold(builder, |builder, p| builder.query(&[("pInt32", p)]));
                let builder = req.p_int64.iter().fold(builder, |builder, p| builder.query(&[("pInt64", p)]));
                let builder = req.p_double.iter().fold(builder, |builder, p| builder.query(&[("pDouble", p)]));
                Ok(builder)
            })();
            Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
        })
        .ok_or_else(|| {
            let mut paths = Vec::new();
            {
                let builder = PathMismatchBuilder::default();
                let builder = builder.maybe_add(
                    Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_string).map(|s| s.as_str()),
                    &[Segment::Literal("first/"), Segment::SingleWildcard],
                    "info.f_string",
                    "first/*");
                let builder = builder.maybe_add(
                    Some(&req).and_then(|m| m.info.as_ref()).and_then(|m| m.f_child.as_ref()).map(|m| &m.f_string).map(|s| s.as_str()),
                    &[Segment::Literal("second/"), Segment::SingleWildcard],
                    "info.f_child.f_string",
                    "second/*");
                let builder = builder.maybe_add(
                    Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_bool),
                    &[Segment::SingleWildcard],
                    "info.f_bool",
                    "*");
                paths.push(builder.build());
            }
            {
                let builder = PathMismatchBuilder::default();
                let builder = builder.maybe_add(
                    Some(&req).and_then(|m| m.info.as_ref()).and_then(|m| m.f_child.as_ref()).map(|m| &m.f_string).map(|s| s.as_str()),
                    &[Segment::Literal("first/"), Segment::SingleWildcard],
                    "info.f_child.f_string",
                    "first/*");
                let builder = builder.maybe_add(
                    Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_string).map(|s| s.as_str()),
                    &[Segment::Literal("second/"), Segment::SingleWildcard],
                    "info.f_string",
                    "second/*");
                let builder = builder.maybe_add(
                    Some(&req).and_then(|m| m.info.as_ref()).map(|m| &m.f_bool),
                    &[Segment::SingleWildcard],
                    "info.f_bool",
                    "*");
                paths.push(builder.build());
            }
            gax::error::Error::binding(BindingError { paths })
        })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn repeat_data_path_trailing_resource(
        &self,
        req: crate::model::RepeatRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::RepeatResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/repeat/{}/{}:pathtrailingresource",
                    try_match(
                        Some(&req)
                            .and_then(|m| m.info.as_ref())
                            .map(|m| &m.f_string)
                            .map(|s| s.as_str()),
                        &[Segment::Literal("first/"), Segment::SingleWildcard]
                    )?,
                    try_match(
                        Some(&req)
                            .and_then(|m| m.info.as_ref())
                            .and_then(|m| m.f_child.as_ref())
                            .map(|m| &m.f_string)
                            .map(|s| s.as_str()),
                        &[Segment::Literal("second"), Segment::TrailingMultiWildcard]
                    )?,
                );
                let path_template =
                    "/v1beta1/repeat/{info.f_string}/{info.f_child.f_string}:pathtrailingresource";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = builder.query(&[("name", &req.name)]);
                    let builder = req
                        .info
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "info")
                        });
                    let builder = builder.query(&[("serverVerify", &req.server_verify)]);
                    let builder = req.intended_binding_uri.iter().fold(builder, |builder, p| {
                        builder.query(&[("intendedBindingUri", p)])
                    });
                    let builder = builder.query(&[("fInt32", &req.f_int32)]);
                    let builder = builder.query(&[("fInt64", &req.f_int64)]);
                    let builder = builder.query(&[("fDouble", &req.f_double)]);
                    let builder = req
                        .p_int32
                        .iter()
                        .fold(builder, |builder, p| builder.query(&[("pInt32", p)]));
                    let builder = req
                        .p_int64
                        .iter()
                        .fold(builder, |builder, p| builder.query(&[("pInt64", p)]));
                    let builder = req
                        .p_double
                        .iter()
                        .fold(builder, |builder, p| builder.query(&[("pDouble", p)]));
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req)
                            .and_then(|m| m.info.as_ref())
                            .map(|m| &m.f_string)
                            .map(|s| s.as_str()),
                        &[Segment::Literal("first/"), Segment::SingleWildcard],
                        "info.f_string",
                        "first/*",
                    );
                    let builder = builder.maybe_add(
                        Some(&req)
                            .and_then(|m| m.info.as_ref())
                            .and_then(|m| m.f_child.as_ref())
                            .map(|m| &m.f_string)
                            .map(|s| s.as_str()),
                        &[Segment::Literal("second"), Segment::TrailingMultiWildcard],
                        "info.f_child.f_string",
                        "second/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn repeat_data_body_put(
        &self,
        req: crate::model::RepeatRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::RepeatResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/repeat:bodyput".to_string();
                let path_template = "/v1beta1/repeat:bodyput";

                let builder = self.inner.builder(reqwest::Method::PUT, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::PUT, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn repeat_data_body_patch(
        &self,
        req: crate::model::RepeatRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::RepeatResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/repeat:bodypatch".to_string();
                let path_template = "/v1beta1/repeat:bodypatch";

                let builder = self.inner.builder(reqwest::Method::PATCH, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::PATCH, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_enum(
        &self,
        req: crate::model::EnumRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::EnumResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/compliance/enum".to_string();
                let path_template = "/v1beta1/compliance/enum";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("unknownEnum", &req.unknown_enum)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn verify_enum(
        &self,
        req: crate::model::EnumResponse,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::EnumResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/compliance/enum".to_string();
                let path_template = "/v1beta1/compliance/enum";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = (|| {
                    let builder = req
                        .request
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "request")
                        });
                    let builder = builder.query(&[("continent", &req.continent)]);
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::ListLocationsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}/locations",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("projects/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{name}/locations";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("filter", &req.filter)]);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("projects/"), Segment::SingleWildcard],
                        "name",
                        "projects/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::Location>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("projects/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/locations/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("projects/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/locations/"),
                            Segment::SingleWildcard,
                        ],
                        "name",
                        "projects/*/locations/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn set_iam_policy(
        &self,
        req: iam_v1::model::SetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_iam_policy(
        &self,
        req: iam_v1::model::GetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn test_iam_permissions(
        &self,
        req: iam_v1::model::TestIamPermissionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/operations".to_string();
                let path_template = "/v1beta1/operations";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("name", &req.name)]);
                let builder = builder.query(&[("filter", &req.filter)]);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder =
                    builder.query(&[("returnPartialSuccess", &req.return_partial_success)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::DELETE, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::DELETE, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }

    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:cancel",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}:cancel";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }
}

/// Implements [Echo](super::stub::Echo) using a [gaxi::http::ReqwestClient].
#[derive(Clone)]
pub struct Echo {
    inner: gaxi::http::ReqwestClient,
}

impl std::fmt::Debug for Echo {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
        f.debug_struct("Echo").field("inner", &self.inner).finish()
    }
}

impl Echo {
    pub async fn new(config: gaxi::options::ClientConfig) -> gax::client_builder::Result<Self> {
        #[cfg(google_cloud_unstable_tracing)]
        let tracing_is_enabled = gaxi::options::tracing_enabled(&config);
        let inner = gaxi::http::ReqwestClient::new(config, crate::DEFAULT_HOST).await?;
        #[cfg(google_cloud_unstable_tracing)]
        let inner = if tracing_is_enabled {
            inner.with_instrumentation(&crate::info::INSTRUMENTATION_CLIENT_INFO)
        } else {
            inner
        };
        Ok(Self { inner })
    }
}

impl super::stub::Echo for Echo {
    async fn echo(
        &self,
        req: crate::model::EchoRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::EchoResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let options = gax::options::internal::set_default_idempotency(options, true);
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/echo:echo".to_string();
                let path_template = "/v1beta1/echo:echo";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn echo_error_details(
        &self,
        req: crate::model::EchoErrorDetailsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::EchoErrorDetailsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/echo:error-details".to_string();
                let path_template = "/v1beta1/echo:error-details";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn fail_echo_with_details(
        &self,
        req: crate::model::FailEchoWithDetailsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::FailEchoWithDetailsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/echo:failWithDetails".to_string();
                let path_template = "/v1beta1/echo:failWithDetails";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn paged_expand(
        &self,
        req: crate::model::PagedExpandRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::PagedExpandResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/echo:pagedExpand".to_string();
                let path_template = "/v1beta1/echo:pagedExpand";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn paged_expand_legacy(
        &self,
        req: crate::model::PagedExpandLegacyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::PagedExpandResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/echo:pagedExpandLegacy".to_string();
                let path_template = "/v1beta1/echo:pagedExpandLegacy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn paged_expand_legacy_mapped(
        &self,
        req: crate::model::PagedExpandRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::PagedExpandLegacyMappedResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/echo:pagedExpandLegacyMapped".to_string();
                let path_template = "/v1beta1/echo:pagedExpandLegacyMapped";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn wait(
        &self,
        req: crate::model::WaitRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/echo:wait".to_string();
                let path_template = "/v1beta1/echo:wait";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn block(
        &self,
        req: crate::model::BlockRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::BlockResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/echo:block".to_string();
                let path_template = "/v1beta1/echo:block";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::ListLocationsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}/locations",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("projects/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{name}/locations";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("filter", &req.filter)]);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("projects/"), Segment::SingleWildcard],
                        "name",
                        "projects/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::Location>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("projects/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/locations/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("projects/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/locations/"),
                            Segment::SingleWildcard,
                        ],
                        "name",
                        "projects/*/locations/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn set_iam_policy(
        &self,
        req: iam_v1::model::SetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_iam_policy(
        &self,
        req: iam_v1::model::GetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn test_iam_permissions(
        &self,
        req: iam_v1::model::TestIamPermissionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/operations".to_string();
                let path_template = "/v1beta1/operations";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("name", &req.name)]);
                let builder = builder.query(&[("filter", &req.filter)]);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder =
                    builder.query(&[("returnPartialSuccess", &req.return_partial_success)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::DELETE, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::DELETE, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }

    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:cancel",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}:cancel";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
        self.inner.get_polling_error_policy(options)
    }

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
        self.inner.get_polling_backoff_policy(options)
    }
}

/// Implements [Identity](super::stub::Identity) using a [gaxi::http::ReqwestClient].
#[derive(Clone)]
pub struct Identity {
    inner: gaxi::http::ReqwestClient,
}

impl std::fmt::Debug for Identity {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
        f.debug_struct("Identity")
            .field("inner", &self.inner)
            .finish()
    }
}

impl Identity {
    pub async fn new(config: gaxi::options::ClientConfig) -> gax::client_builder::Result<Self> {
        #[cfg(google_cloud_unstable_tracing)]
        let tracing_is_enabled = gaxi::options::tracing_enabled(&config);
        let inner = gaxi::http::ReqwestClient::new(config, crate::DEFAULT_HOST).await?;
        #[cfg(google_cloud_unstable_tracing)]
        let inner = if tracing_is_enabled {
            inner.with_instrumentation(&crate::info::INSTRUMENTATION_CLIENT_INFO)
        } else {
            inner
        };
        Ok(Self { inner })
    }
}

impl super::stub::Identity for Identity {
    async fn create_user(
        &self,
        req: crate::model::CreateUserRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::User>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/users".to_string();
                let path_template = "/v1beta1/users";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_user(
        &self,
        req: crate::model::GetUserRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::User>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "name",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.name));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn update_user(
        &self,
        req: crate::model::UpdateUserRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::User>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req)
                            .and_then(|m| m.user.as_ref())
                            .map(|m| &m.name)
                            .map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{user.name}";

                let builder = self.inner.builder(reqwest::Method::PATCH, path);
                let builder = (|| {
                    let builder = req
                        .update_mask
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "updateMask")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::PATCH, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req)
                            .and_then(|m| m.user.as_ref())
                            .map(|m| &m.name)
                            .map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "user.name",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(req.user, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn delete_user(
        &self,
        req: crate::model::DeleteUserRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::DELETE, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::DELETE, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "name",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.name));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }

    async fn list_users(
        &self,
        req: crate::model::ListUsersRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListUsersResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/users".to_string();
                let path_template = "/v1beta1/users";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::ListLocationsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}/locations",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("projects/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{name}/locations";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("filter", &req.filter)]);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("projects/"), Segment::SingleWildcard],
                        "name",
                        "projects/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::Location>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("projects/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/locations/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("projects/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/locations/"),
                            Segment::SingleWildcard,
                        ],
                        "name",
                        "projects/*/locations/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn set_iam_policy(
        &self,
        req: iam_v1::model::SetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_iam_policy(
        &self,
        req: iam_v1::model::GetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn test_iam_permissions(
        &self,
        req: iam_v1::model::TestIamPermissionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/operations".to_string();
                let path_template = "/v1beta1/operations";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("name", &req.name)]);
                let builder = builder.query(&[("filter", &req.filter)]);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder =
                    builder.query(&[("returnPartialSuccess", &req.return_partial_success)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::DELETE, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::DELETE, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }

    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:cancel",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}:cancel";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }
}

/// Implements [Messaging](super::stub::Messaging) using a [gaxi::http::ReqwestClient].
#[derive(Clone)]
pub struct Messaging {
    inner: gaxi::http::ReqwestClient,
}

impl std::fmt::Debug for Messaging {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
        f.debug_struct("Messaging")
            .field("inner", &self.inner)
            .finish()
    }
}

impl Messaging {
    pub async fn new(config: gaxi::options::ClientConfig) -> gax::client_builder::Result<Self> {
        #[cfg(google_cloud_unstable_tracing)]
        let tracing_is_enabled = gaxi::options::tracing_enabled(&config);
        let inner = gaxi::http::ReqwestClient::new(config, crate::DEFAULT_HOST).await?;
        #[cfg(google_cloud_unstable_tracing)]
        let inner = if tracing_is_enabled {
            inner.with_instrumentation(&crate::info::INSTRUMENTATION_CLIENT_INFO)
        } else {
            inner
        };
        Ok(Self { inner })
    }
}

impl super::stub::Messaging for Messaging {
    async fn create_room(
        &self,
        req: crate::model::CreateRoomRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Room>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/rooms".to_string();
                let path_template = "/v1beta1/rooms";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_room(
        &self,
        req: crate::model::GetRoomRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Room>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "name",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.name));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn update_room(
        &self,
        req: crate::model::UpdateRoomRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Room>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req)
                            .and_then(|m| m.room.as_ref())
                            .map(|m| &m.name)
                            .map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{room.name}";

                let builder = self.inner.builder(reqwest::Method::PATCH, path);
                let builder = (|| {
                    let builder = req
                        .update_mask
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "updateMask")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::PATCH, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req)
                            .and_then(|m| m.room.as_ref())
                            .map(|m| &m.name)
                            .map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "room.name",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(req.room, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn delete_room(
        &self,
        req: crate::model::DeleteRoomRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::DELETE, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::DELETE, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "name",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.name));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }

    async fn list_rooms(
        &self,
        req: crate::model::ListRoomsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListRoomsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/rooms".to_string();
                let path_template = "/v1beta1/rooms";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn create_blurb(
        &self,
        req: crate::model::CreateBlurbRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Blurb>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}/blurbs",
                    try_match(
                        Some(&req).map(|m| &m.parent).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{parent}/blurbs";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}/blurbs",
                    try_match(
                        Some(&req).map(|m| &m.parent).map(|s| s.as_str()),
                        &[
                            Segment::Literal("users/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/profile")
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{parent}/blurbs";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.parent).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "parent",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.parent).map(|s| s.as_str()),
                        &[
                            Segment::Literal("users/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/profile"),
                        ],
                        "parent",
                        "users/*/profile",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None
                .or(Some(&req.parent))
                .or(req.blurb.as_ref().map(|s| &s.user));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_blurb(
        &self,
        req: crate::model::GetBlurbRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Blurb>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("users/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/profile/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "name",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("users/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/profile/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "name",
                        "users/*/profile/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.name));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn update_blurb(
        &self,
        req: crate::model::UpdateBlurbRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Blurb>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req)
                            .and_then(|m| m.blurb.as_ref())
                            .map(|m| &m.name)
                            .map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{blurb.name}";

                let builder = self.inner.builder(reqwest::Method::PATCH, path);
                let builder = (|| {
                    let builder = req
                        .update_mask
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "updateMask")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::PATCH, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req)
                            .and_then(|m| m.blurb.as_ref())
                            .map(|m| &m.name)
                            .map(|s| s.as_str()),
                        &[
                            Segment::Literal("users/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/profile/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{blurb.name}";

                let builder = self.inner.builder(reqwest::Method::PATCH, path);
                let builder = (|| {
                    let builder = req
                        .update_mask
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "updateMask")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::PATCH, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req)
                            .and_then(|m| m.blurb.as_ref())
                            .map(|m| &m.name)
                            .map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "blurb.name",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req)
                            .and_then(|m| m.blurb.as_ref())
                            .map(|m| &m.name)
                            .map(|s| s.as_str()),
                        &[
                            Segment::Literal("users/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/profile/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "blurb.name",
                        "users/*/profile/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(req.blurb.as_ref().map(|s| &s.user));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(req.blurb, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn delete_blurb(
        &self,
        req: crate::model::DeleteBlurbRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::DELETE, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::DELETE, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("users/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/profile/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::DELETE, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::DELETE, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "name",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("users/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/profile/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "name",
                        "users/*/profile/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.name));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }

    async fn list_blurbs(
        &self,
        req: crate::model::ListBlurbsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListBlurbsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}/blurbs",
                    try_match(
                        Some(&req).map(|m| &m.parent).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{parent}/blurbs";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}/blurbs",
                    try_match(
                        Some(&req).map(|m| &m.parent).map(|s| s.as_str()),
                        &[
                            Segment::Literal("users/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/profile")
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{parent}/blurbs";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.parent).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "parent",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.parent).map(|s| s.as_str()),
                        &[
                            Segment::Literal("users/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/profile"),
                        ],
                        "parent",
                        "users/*/profile",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.parent));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn search_blurbs(
        &self,
        req: crate::model::SearchBlurbsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}/blurbs:search",
                    try_match(
                        Some(&req).map(|m| &m.parent).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{parent}/blurbs:search";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}/blurbs:search",
                    try_match(
                        Some(&req).map(|m| &m.parent).map(|s| s.as_str()),
                        &[
                            Segment::Literal("users/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/profile")
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{parent}/blurbs:search";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = builder.query(&[("query", &req.query)]);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.parent).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "parent",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.parent).map(|s| s.as_str()),
                        &[
                            Segment::Literal("users/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/profile"),
                        ],
                        "parent",
                        "users/*/profile",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.parent));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::ListLocationsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}/locations",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("projects/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{name}/locations";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("filter", &req.filter)]);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("projects/"), Segment::SingleWildcard],
                        "name",
                        "projects/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::Location>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("projects/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/locations/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("projects/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/locations/"),
                            Segment::SingleWildcard,
                        ],
                        "name",
                        "projects/*/locations/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn set_iam_policy(
        &self,
        req: iam_v1::model::SetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_iam_policy(
        &self,
        req: iam_v1::model::GetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn test_iam_permissions(
        &self,
        req: iam_v1::model::TestIamPermissionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/operations".to_string();
                let path_template = "/v1beta1/operations";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("name", &req.name)]);
                let builder = builder.query(&[("filter", &req.filter)]);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder =
                    builder.query(&[("returnPartialSuccess", &req.return_partial_success)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::DELETE, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::DELETE, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }

    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:cancel",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}:cancel";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
        self.inner.get_polling_error_policy(options)
    }

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
        self.inner.get_polling_backoff_policy(options)
    }
}

/// Implements [SequenceService](super::stub::SequenceService) using a [gaxi::http::ReqwestClient].
#[derive(Clone)]
pub struct SequenceService {
    inner: gaxi::http::ReqwestClient,
}

impl std::fmt::Debug for SequenceService {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
        f.debug_struct("SequenceService")
            .field("inner", &self.inner)
            .finish()
    }
}

impl SequenceService {
    pub async fn new(config: gaxi::options::ClientConfig) -> gax::client_builder::Result<Self> {
        #[cfg(google_cloud_unstable_tracing)]
        let tracing_is_enabled = gaxi::options::tracing_enabled(&config);
        let inner = gaxi::http::ReqwestClient::new(config, crate::DEFAULT_HOST).await?;
        #[cfg(google_cloud_unstable_tracing)]
        let inner = if tracing_is_enabled {
            inner.with_instrumentation(&crate::info::INSTRUMENTATION_CLIENT_INFO)
        } else {
            inner
        };
        Ok(Self { inner })
    }
}

impl super::stub::SequenceService for SequenceService {
    async fn create_sequence(
        &self,
        req: crate::model::CreateSequenceRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Sequence>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/sequences".to_string();
                let path_template = "/v1beta1/sequences";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(req.sequence, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn create_streaming_sequence(
        &self,
        req: crate::model::CreateStreamingSequenceRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::StreamingSequence>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/streamingSequences".to_string();
                let path_template = "/v1beta1/streamingSequences";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(req.streaming_sequence, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_sequence_report(
        &self,
        req: crate::model::GetSequenceReportRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::SequenceReport>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("sequences/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/sequenceReport")
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("sequences/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/sequenceReport"),
                        ],
                        "name",
                        "sequences/*/sequenceReport",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.name));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_streaming_sequence_report(
        &self,
        req: crate::model::GetStreamingSequenceReportRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::StreamingSequenceReport>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("streamingSequences/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/streamingSequenceReport")
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("streamingSequences/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/streamingSequenceReport"),
                        ],
                        "name",
                        "streamingSequences/*/streamingSequenceReport",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.name));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn attempt_sequence(
        &self,
        req: crate::model::AttemptSequenceRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "name",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.name));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }

    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::ListLocationsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}/locations",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("projects/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{name}/locations";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("filter", &req.filter)]);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("projects/"), Segment::SingleWildcard],
                        "name",
                        "projects/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::Location>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("projects/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/locations/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("projects/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/locations/"),
                            Segment::SingleWildcard,
                        ],
                        "name",
                        "projects/*/locations/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn set_iam_policy(
        &self,
        req: iam_v1::model::SetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_iam_policy(
        &self,
        req: iam_v1::model::GetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn test_iam_permissions(
        &self,
        req: iam_v1::model::TestIamPermissionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/operations".to_string();
                let path_template = "/v1beta1/operations";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("name", &req.name)]);
                let builder = builder.query(&[("filter", &req.filter)]);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder =
                    builder.query(&[("returnPartialSuccess", &req.return_partial_success)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::DELETE, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::DELETE, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }

    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:cancel",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}:cancel";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }
}

/// Implements [Testing](super::stub::Testing) using a [gaxi::http::ReqwestClient].
#[derive(Clone)]
pub struct Testing {
    inner: gaxi::http::ReqwestClient,
}

impl std::fmt::Debug for Testing {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
        f.debug_struct("Testing")
            .field("inner", &self.inner)
            .finish()
    }
}

impl Testing {
    pub async fn new(config: gaxi::options::ClientConfig) -> gax::client_builder::Result<Self> {
        #[cfg(google_cloud_unstable_tracing)]
        let tracing_is_enabled = gaxi::options::tracing_enabled(&config);
        let inner = gaxi::http::ReqwestClient::new(config, crate::DEFAULT_HOST).await?;
        #[cfg(google_cloud_unstable_tracing)]
        let inner = if tracing_is_enabled {
            inner.with_instrumentation(&crate::info::INSTRUMENTATION_CLIENT_INFO)
        } else {
            inner
        };
        Ok(Self { inner })
    }
}

impl super::stub::Testing for Testing {
    async fn create_session(
        &self,
        req: crate::model::CreateSessionRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Session>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/sessions".to_string();
                let path_template = "/v1beta1/sessions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(req.session, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_session(
        &self,
        req: crate::model::GetSessionRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Session>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("sessions/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("sessions/"), Segment::SingleWildcard],
                        "name",
                        "sessions/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.name));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn list_sessions(
        &self,
        req: crate::model::ListSessionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListSessionsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/sessions".to_string();
                let path_template = "/v1beta1/sessions";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn delete_session(
        &self,
        req: crate::model::DeleteSessionRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("sessions/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::DELETE, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::DELETE, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("sessions/"), Segment::SingleWildcard],
                        "name",
                        "sessions/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.name));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }

    async fn report_session(
        &self,
        req: crate::model::ReportSessionRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ReportSessionResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:report",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("sessions/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{name}:report";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("sessions/"), Segment::SingleWildcard],
                        "name",
                        "sessions/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.name));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn list_tests(
        &self,
        req: crate::model::ListTestsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListTestsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}/tests",
                    try_match(
                        Some(&req).map(|m| &m.parent).map(|s| s.as_str()),
                        &[Segment::Literal("sessions/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{parent}/tests";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.parent).map(|s| s.as_str()),
                        &[Segment::Literal("sessions/"), Segment::SingleWildcard],
                        "parent",
                        "sessions/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.parent));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn delete_test(
        &self,
        req: crate::model::DeleteTestRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("sessions/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/tests/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::DELETE, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::DELETE, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("sessions/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/tests/"),
                            Segment::SingleWildcard,
                        ],
                        "name",
                        "sessions/*/tests/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.name));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }

    async fn verify_test(
        &self,
        req: crate::model::VerifyTestRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::VerifyTestResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:check",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("sessions/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/tests/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}:check";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = builder.query(&[("answer", &req.answer)]);
                let builder = req
                    .answers
                    .iter()
                    .fold(builder, |builder, p| builder.query(&[("answers", p)]));
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("sessions/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/tests/"),
                            Segment::SingleWildcard,
                        ],
                        "name",
                        "sessions/*/tests/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.name));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::ListLocationsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}/locations",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("projects/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{name}/locations";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("filter", &req.filter)]);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[Segment::Literal("projects/"), Segment::SingleWildcard],
                        "name",
                        "projects/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::Location>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("projects/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/locations/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("projects/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/locations/"),
                            Segment::SingleWildcard,
                        ],
                        "name",
                        "projects/*/locations/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn set_iam_policy(
        &self,
        req: iam_v1::model::SetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:setIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:setIamPolicy";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_iam_policy(
        &self,
        req: iam_v1::model::GetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:getIamPolicy",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:getIamPolicy";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = (|| {
                    let builder = req
                        .options
                        .as_ref()
                        .map(|p| serde_json::to_value(p).map_err(Error::ser))
                        .transpose()?
                        .into_iter()
                        .fold(builder, |builder, v| {
                            use gaxi::query_parameter::QueryParameter;
                            v.add(builder, "options")
                        });
                    Ok(builder)
                })();
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn test_iam_permissions(
        &self,
        req: iam_v1::model::TestIamPermissionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:testIamPermissions",
                    try_match(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard]
                    )?,
                );
                let path_template = "/v1beta1/{resource}:testIamPermissions";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("users/"), Segment::SingleWildcard],
                        "resource",
                        "users/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("rooms/"), Segment::SingleWildcard],
                        "resource",
                        "rooms/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[
                            Segment::Literal("rooms/"),
                            Segment::SingleWildcard,
                            Segment::Literal("/blurbs/"),
                            Segment::SingleWildcard,
                        ],
                        "resource",
                        "rooms/*/blurbs/*",
                    );
                    paths.push(builder.build());
                }
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.resource).map(|s| s.as_str()),
                        &[Segment::Literal("sequences/"), Segment::SingleWildcard],
                        "resource",
                        "sequences/*",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        #[cfg(google_cloud_unstable_tracing)]
        let options = {
            let resource_name = Option::<&String>::None.or(Some(&req.resource));
            if let Some(rn) = resource_name {
                let full_resource_name = format!("//localhost:7469/{}", rn);
                gax::options::internal::set_resource_name(options, full_resource_name)
            } else {
                options
            }
        };
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(Some(req), &method);
        self.inner.execute(builder, body, options).await
    }

    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = "/v1beta1/operations".to_string();
                let path_template = "/v1beta1/operations";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = builder.query(&[("name", &req.name)]);
                let builder = builder.query(&[("filter", &req.filter)]);
                let builder = builder.query(&[("pageSize", &req.page_size)]);
                let builder = builder.query(&[("pageToken", &req.page_token)]);
                let builder =
                    builder.query(&[("returnPartialSuccess", &req.return_partial_success)]);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::GET, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::GET, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await
    }

    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}";

                let builder = self.inner.builder(reqwest::Method::DELETE, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::DELETE, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }

    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        use gax::error::binding::BindingError;
        use gaxi::path_parameter::PathMismatchBuilder;
        use gaxi::path_parameter::try_match;
        use gaxi::routing_parameter::Segment;
        let (builder, method, _path_template) = None
            .or_else(|| {
                let path = format!(
                    "/v1beta1/{}:cancel",
                    try_match(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard
                        ]
                    )?,
                );
                let path_template = "/v1beta1/{name}:cancel";

                let builder = self.inner.builder(reqwest::Method::POST, path);
                let builder = Ok(builder);
                Some(builder.map(|b| (b, reqwest::Method::POST, path_template)))
            })
            .ok_or_else(|| {
                let mut paths = Vec::new();
                {
                    let builder = PathMismatchBuilder::default();
                    let builder = builder.maybe_add(
                        Some(&req).map(|m| &m.name).map(|s| s.as_str()),
                        &[
                            Segment::Literal("operations"),
                            Segment::TrailingMultiWildcard,
                        ],
                        "name",
                        "operations/**",
                    );
                    paths.push(builder.build());
                }
                gax::error::Error::binding(BindingError { paths })
            })??;
        #[cfg(google_cloud_unstable_tracing)]
        let options = gax::options::internal::set_path_template(options, _path_template);
        let options = gax::options::internal::set_default_idempotency(
            options,
            gaxi::http::default_idempotency(&method),
        );
        let builder = builder.query(&[("$alt", "json;enum-encoding=int")]).header(
            "x-goog-api-client",
            reqwest::header::HeaderValue::from_static(&crate::info::X_GOOG_API_CLIENT_HEADER),
        );
        let body = gaxi::http::handle_empty(None::<gaxi::http::NoBody>, &method);
        self.inner.execute(builder, body, options).await.map(
            |r: gax::response::Response<wkt::Empty>| {
                let (parts, _) = r.into_parts();
                gax::response::Response::from_parts(parts, ())
            },
        )
    }
}
